package kr.co.dayve.site.management.util;

/**
 * Created by IntelliJ IDEA.
 * User: Yusung
 * Date: 12. 3. 9
 * Time: 오전 11:30
 * To change this template use File | Settings | File Templates.
 */

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.security.providers.encoding.ShaPasswordEncoder;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Properties;

public class DayveCommon {
    /**
     * 입력 받은 패스워드를 SHA 를 이용 해서 암호화 한 뒤 반환 한다.
     *
     * @param password
     * @return
     */
    public String getEncodedPassword(String password) {
        ShaPasswordEncoder encoder = new ShaPasswordEncoder();
        return encoder.encodePassword(password, null);
    }

    /**
     * 사용법
     */
//    MyHistoryMember parameterMember = new MyHistoryMember();
//   parameterMember.setPassword(myHistoryCommon.getEncodedPassword(jsonMember2.getString("password")));



}
